//
//  searchResultCell.m
//  XDCommonApp
//
//  Created by XD-XY on 3/15/14.
//  Copyright (c) 2014 XD-XY. All rights reserved.
//

#import "searchResultCell.h"
#import "XDTools.h"
#import "XDHeader.h"
@implementation searchResultCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        [self makeView];
    }
    return self;
}

-(void)makeView
{
    //头像 point：30x30  size:108*108
    self.heardImageView = [[UIImageView alloc] initWithFrame:CGRectMake(15, 15, 108/2, 108/2)];
    _heardImageView.backgroundColor = [UIColor clearColor];
    
    //标题
    self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(12+width_x(_heardImageView), 32/2,220, 15)];
    _titleLabel.font = [UIFont systemFontOfSize:15];
    _titleLabel.textColor = [UIColor blackColor];
    _titleLabel.backgroundColor = [UIColor clearColor];
    
    //作者
    self.authorLabel = [[UILabel alloc] initWithFrame:CGRectMake(_titleLabel.frame.origin.x, height_y(_titleLabel)+5, 200, 12.5)];
    _authorLabel.font = [UIFont systemFontOfSize:12.5];
    _authorLabel.textColor = TEXTBLACKCOLORE4;
    _authorLabel.backgroundColor = [UIColor clearColor];
    
    //展区
    self.boothLabel = [[UILabel alloc] initWithFrame:CGRectMake(_titleLabel.frame.origin.x, height_y(_authorLabel)+5, 200, 12.5)];
    _boothLabel.font = [UIFont boldSystemFontOfSize:12];
    _boothLabel.textColor = RGBA(29, 29, 29, 1);
    _boothLabel.backgroundColor = [UIColor clearColor];
    
    //画廊
    self.galleryLabel = [[UILabel alloc] initWithFrame:CGRectMake(width_x(_boothLabel),_boothLabel.frame.origin.y, 110, 12.5)];
    _galleryLabel.font = [UIFont systemFontOfSize:12.5];
    _galleryLabel.textColor = TEXTBLACKCOLORE4;
    _galleryLabel.backgroundColor = [UIColor clearColor];
    
    //浏览量
    self.browseLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,0,(640-45)/2.0f,170/2.0f)];
    _browseLabel.backgroundColor = [UIColor clearColor];
    _browseLabel.font = [UIFont systemFontOfSize:11];
    _browseLabel.textAlignment = NSTextAlignmentRight;
    _browseLabel.textColor = TEXTBLACKCOLORE;
    
    self.rightImageView = [[UIImageView alloc] initWithFrame:CGRectMake(UI_SCREEN_WIDTH-93/2.0f-24/2.0f-4,73/2.0f, 24/2, 16/2)];
    _rightImageView.image = [UIImage imageNamed:@"hotPoint_attention"];
    
    
    [self addSubview:_heardImageView];
    [self addSubview:_titleLabel];
    [self addSubview:_authorLabel];
    [self addSubview:_boothLabel];
    [self addSubview:_galleryLabel];
    [self addSubview:_boothLabel];
    [self addSubview:_browseLabel];
    [self addSubview:_rightImageView];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
